<!--
 * @Author: your name
 * @Date: 2021-09-14 16:32:52
 * @LastEditTime: 2021-09-14 16:34:16
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: /sports-wechat-c/pages/course/detail/detail.vue
-->
<template>
  <view class="container"></view>
</template>

<script>
import {getCurrentPageUrl,getCurrentPageParam} from '@/common/js/util.js'
export default {
  data() {
    return {
    };
  },
  onLoad(options) {
    // 通过扫描小程序码，得到的参数格式为{scene: 'id%3D1372722514836873216'}
    let redirectUrl = '/course/detail/detail'
    let arr = Object.keys(options)
    if (arr.length) {
      arr.forEach((item, index) => {
        if (index === 0) {
          redirectUrl += `?${item}=${options[item]}`
        } else {
          redirectUrl += `&${item}=${options[item]}`
        }
      })
    }
    console.log(redirectUrl)
    uni.redirectTo({
      url: redirectUrl
    })
  },
  onShow() {
    console.log('onShow------------------', wx.env);
  },
  mounted() {
    console.log('mounted------------------', wx.env);
  },
  onReady() {
    console.log('onReady------------------', wx.env);
  },
  methods: {
  }
};
</script>

<style lang="scss">
</style>
